package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 支出表
 * </p>
 *
 * @author hpiggy
 * @since 2025-05-17
 */
@Data
@TableName("finc_disburse")
@ApiModel(value = "FincDisburse对象", description = "支出表")
public class FincDisburse implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("校区id")
    private Long schoolId;

    @ApiModelProperty("部门id")
    private Long departmentId;

    @ApiModelProperty("支出类型")
    private Long fincTypeId;

    @ApiModelProperty("子支出类型")
    private Long fincTypeSubId;

    @ApiModelProperty("经办人id")
    private Long handleId;

    @ApiModelProperty("经办日期")
    private LocalDate handleDate;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("支出金额")
    private BigDecimal disbursePrice;

    @ApiModelProperty("支出明细")
    private String disburseDetail;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建人id")
    private Long createdId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    private Integer deleted;

    @ApiModelProperty("支出类型名称")
    @TableField(exist = false)
    private String fincTypeName;

    @ApiModelProperty("子支出类型名称")
    @TableField(exist = false)
    private String fincTypeSubName;

    @ApiModelProperty("校区")
    @TableField(exist = false)
    private String schoolName;

    @ApiModelProperty("经办人")
    @TableField(exist = false)
    private String handleName;

    @ApiModelProperty("校区或者部门id")
    @TableField(exist = false)
    private Long schoolOrDepartmentId;

    @ApiModelProperty("校区或者部门名称")
    @TableField(exist = false)
    private String schoolOrDepartmentName;

    @ApiModelProperty("金额总数")
    @TableField(exist = false)
    private BigDecimal totalDisbursePrice;

    @ApiModelProperty("集合")
    @TableField(exist = false)
    private List<FincDisburse> fincDisburseList;

}
